package com.zhengbing.tj.design.singleton;

/**
 * 懒汉式单例模式实现类
 * 特点：首次调用时初始化实例，非线程安全
 * 
 * @author zhengbing
 * @date 2025-07-23
 */
public class LazySingleton {
    private static LazySingleton instance;

    private LazySingleton() {}

    // 线程不安全的懒汉式实现
    public static LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }
        return instance;
    }

    public void showMessage() {
        System.out.println("Lazy Singleton Instance");
    }
}